home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2001 May / may_2001.iso / intercd / root / Html / ^stIHEditor / setup.exe / {app} / Scripts / No Mouseevents.txt < prev    next >
Encoding:
Text File  |  2000-10-10  |  723 b   |  36 lines

  1. <SCRIPT language="JavaScript" type="text/javascript">
  2.   <!-- // Hide from older browsers
  3.   
  4.   /* Place this script into the head section.
  5.   
  6.   This script doesn't allow the Contextmenu on Rightclick.
  7.   ! IE Only ! */
  8.   
  9.   var message="Your Message here!";
  10.   function click(e)
  11.   {
  12.     if (document.all)
  13.     {
  14.       if (event.button==2||event.button==3) 
  15.       {
  16.         alert(message);
  17.         return false;
  18.       }     
  19.     }
  20.     if (document.layers)
  21.     {
  22.       if (e.which == 3)
  23.       {
  24.         alert(message);
  25.         return false;
  26.       }
  27.     }
  28.   }
  29.   if (document.layers)
  30.   {
  31.     document.captureevents(event.mousedown);
  32.   }
  33.   document.onmousedown=click;
  34.   // End hide --> 
  35. </SCRIPT>
  36.